package pasantias.Dominio;

public class Rectangle implements Figura {

	private final Dot vertex;
	private final int width;
	private final int height;
	
	public Rectangle(Dot dot, int width, int height) {
		this.vertex = dot;
		this.width = width;
		this.height = height;
	}
	
	@Override
	public String toString(){
		return vertex.toString() + " Width " + width + " Height " + height;
	}

	public Dot getVertex() {
		return vertex;
	}

	public int getWidth() {
		return width;
	}

	public int getHeight() {
		return height;
	}

	public int getArea() {
		// TODO Auto-generated method stub
		return height*width;
	}

	@Override
	public void accept(FiguresVisitor visitor) {
		visitor.visit(this);
	}

}
